extends mixins/_layout
block content
	body
		// 头部
		include mixins/_header_t.jade
		.main-content
			.row
				.container
					.position-tips
							p.nomargin
								a(href='./', target='_blank') 首页
								|  > 考证分类
					img.width100(style='margin-bottom:20px;', src='/images/ad.jpg')
			.row
				.container
					.col-xs-12.course-list.no-padding
						ul.nav.nav-tabs
							each item,i in coursesType
								if item.id == $id
									li.active
										a(href='/courses?id=#{item.id}') #{item.name}
								else
									li
										a(href='/courses?id=#{item.id}') #{item.name}
						// Tab panes
						if courses.length > 0
							.tab-content
								#course_1.tab-pane.active(role='tabpanel')
									each item,key in courses
										a(href='javascript:void(0)',onclick="tab(this,#{key})") #{item.title}
			.row(style='margin-bottom: 20px;margin-top: 20px;')
				.container
					#courseList.col-xs-9(style='background: #fff;padding-top:15px')
						if courses.length == 0
							div(style="text-align:center;height:520px;line-height:200px;") 暂时找不到数据.
						each item,key in courses
							.box-border.left-box(id='p_#{key}')
								.media
									a.media-left.media-top.pull-left(href='/courses/detail?id='+item.id, target='_blank')
										img(src='#{item.imgPath}', alt='')
									.media-body
										h4.media-heading
											a(href='/courses/detail?id=#{item.id}', target='_blank') #{item.title}
										p(style="width:420px;height:20px;overflow:hidden;")
											span 报名地址:
											a.pos(href='http://map.baidu.com/?newmap=1&ie=utf-8&s=s%26wd%3D#{item.address}', target='_blank')
											span #{item.address}
										p 报名即享:考前培训 / 专业答疑 / 发送资料
										p 发证机关:#{item.appraisal}
										p
											span 价格:
											span.edu-red-c.font20.price.priceItem.priceItem_1 ￥#{item.price}
										.levels
											each _item in item.tag.split(',')
												if _item
													a(href='javascript:void(0)') #{_item}
										.contact
											a.consultOnline.edu-blue-bg(href='javascript:void(0)') 报名咨询
											a.edu-red-bg(href='javascript:void(0)', onclick='enrollProduct(1, 2)') 在线报名
											p.tel
												| #{$sys.sys_tel}
					.col-xs-3.no-padding-right
						include mixins/side_right.jade

		// 底部
		include mixins/_footer.jade
		script.
			var tab = function ($this,index) {
				$('#courseList>div').addClass('hidden');
				$('#p_'+index).removeClass('hidden');
				$($this).parent().children('a').removeClass('active');
				$($this).addClass('active')
			}
